package com.trkj.property_controller;

import com.trkj.entity.CarInfoEntity;
import com.trkj.service.SelectCarService;
import com.trkj.vo.AjaxResponse;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/Car")
public class SelectCarController {

    @Resource
    private SelectCarService service;


    @GetMapping("selectCarInfo")
    public AjaxResponse selectCarInfo(){
        return AjaxResponse.success(service.selectCarInfo());
    }

    @PostMapping("/inserCar")
    public AjaxResponse inserCar(@RequestBody CarInfoEntity carInfoEntity){
        return AjaxResponse.success(service.insertCar(carInfoEntity));
    }

    @GetMapping("selectYardandCar")
    public AjaxResponse selectYardandCar(){
        return AjaxResponse.success(service.selectYardandCar());
    }

}
